package com.itheima.d01_linkedlist_queque;

import java.util.LinkedList;

/**
 * 目标：了解LinkedList的使用场景
 * 适合首尾频繁的操作： 队列结构
 */
public class Test {

    public static void main(String[] args) {
        //需求：实现一个外卖订单任务队列
        //1.创建集合存储订单任务
        LinkedList<String> foodOrderTasks = new LinkedList<>();

        //2.缓存订单任务
        foodOrderTasks.addLast("翔哥");
        foodOrderTasks.addLast("远哥");
        foodOrderTasks.addLast("冰哥");
        foodOrderTasks.addLast("阳哥");

        //3.取出订单任务，执行订单任务
        System.out.println(foodOrderTasks.removeFirst());
        System.out.println(foodOrderTasks.removeFirst());
        System.out.println(foodOrderTasks.removeFirst());
        System.out.println(foodOrderTasks.removeFirst());

    }

}







